package com.example.luyao.faceservertest;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;


public class SimpleHttpClient {
    public static String BASE_URL = "http://192.168.1.149:5055";

    public interface ServerAPI {
        @GET("get_all_user")
        Call<ResponseBody> get_all_user();

        @FormUrlEncoded
        @POST("delete_user")
        Call<ResponseBody> delete_user(@Field("feature_id") int feature_id);

        @Multipart
        @POST("update_user_info")
        Call<ResponseBody> update_user_info(
                @Part MultipartBody.Part image,
                @Query("feature_id") int feature_id, @Query("user_id") String user_id,
                @Query("remark") String remark, @Query("name") String name);

        @Multipart
        @POST("recognition_user")
        Call<ResponseBody> recognition_user(@Part MultipartBody.Part image);

        @Multipart
        @POST("register_user")
        Call<ResponseBody> register_user(
                @Part MultipartBody.Part image,
                @Query("user_id") String user_id,
                @Query("remark") String remark, @Query("name") String name);
    }
}